<!DOCTYPE html>
<html >
	<head >

		<title ng-bind="title">主营业务</title>
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		
		<link rel="stylesheet" type="text/css" href="style/style.css" />
		
		<script type="text/javascript" src="js/jquery-1.8.1.min.js"></script>
		<script type="text/javascript" src="js/index.js"></script>
		<script src="js/angular.min.1.4.6.js"></script> 
		<script type="text/javascript" src="js/jquery.SuperSlide.2.1.1.js"></script>
		<script type="text/javascript" src="layer/layer.js"></script>
		
		
	</head>

	<body  ng-app="indexApp" ng-controller="box">
		<div class="conter ma">

			<div class="header" ng-include="'header.html'" ></div>
			
			<div class="nybanner">
				<img src="images/nybanner.jpg" width="997" height="198" /></div>
			<div class="side">
				<div class="stitle">
					主营业务<span> </span></div>
				<div class="conts clicksub">
					<dl>

						<dt class='on'><a href="mainBusiness.htm" >检测服务</a></dt>

						<dt class='on'><a href="auth.htm" >产品认证</a></dt>

						<dt class='on'><a href="train.htm" >培训项目</a></dt>

					</dl>
				</div>

				<div class="side_c">
					<p>
						<a href="mainBusiness.htm"><img src="images/sc1.jpg" width="226" height="73" /></a>
					</p>
					<p>
						<a href="auth.htm"><img src="images/sc2.jpg" width="226" height="74" /></a>
					</p>
					<p>
						<a href="train.htm"><img src="images/sc3.jpg" width="226" height="78" /></a>
					</p>
				</div>
			</div>
			<div class="mian">
				<div class="mtitle">
					培训项目<span>您的当前位置：<a href="home.htm" >主页</a> > <a href="train.htm" >培训项目</a> > 
                </span>
				</div>
				<div class="miancont">
				<div class="detail">
			        <div class="yscont">
			          <div class="tit">{{title}}</div>
			          <div class="related">
			<p>最近更新时间：{{createdAt}}</p>
			          </div>
			          <div class="text">
			            {{content}}
			          </div>
			          
			          
			        </div>
			      </div>
					
				</div>
			</div>
			<div class="clear">
			</div>

			<div class="footer"ng-include="'footer.html'" ></div>

		</div>
		<script type="text/javascript">
		var app = angular.module('indexApp', []);
		app.controller('indexContr', function($scope) {
			$(".menu ul li.dq").each(function() {
				$(this).hover(function() {

					$(this).find(".submenu").stop(false, true).slideDown();
				}, function() {

					$(this).find(".submenu").stop(false, true).slideUp();

				});
			});
			function menuon(id) {
				$(".menu ul li.dq a").each(function() {
					$(this).removeClass("on");
				});
				$(".menu ul li.dq").eq(id - 1).children("a").addClass("on");
			}
			$(".menu ul li .submenu .submenubg a:last-child").css("border-bottom", "none");
			menuon(4);
		});
		app.controller('box', function($scope,$http) {
			function GetQueryString(name){
			     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
			     var r = window.location.search.substr(1).match(reg);
			     if(r!=null)return  decodeURI(r[2]); return null;
			}
			console.log(GetQueryString('id'));
			var infoId = GetQueryString('id');
			// 简单的 GET 请求，可以改为 POST
			$http({
			    method: 'POST',
			    url: 'information/getInfo?id='+infoId
			}).then(function successCallback(response) {
			        // 请求成功执行代码
			        console.log(response);
			        var res = response.data;
			        if(res.status == 10001){
			        	$scope.content = res.data.content;
			        	$scope.title = res.data.title;
			        	$scope.createdAt =  fmtDate(res.data.createdAt);
			        }
				
			    }, function errorCallback(response) {
			        // 请求失败执行代码
			});
			function fmtDate(obj){
			    var date =  new Date(obj);
			    var y = 1900+date.getYear();
			    var m = "0"+(date.getMonth()+1);
			    var d = "0"+date.getDate();
			    return y+"-"+m.substring(m.length-2,m.length)+"-"+d.substring(d.length-2,d.length);
			}
		});
		
		
		</script>
	<script type="text/javascript" src="layer/layer.js"></script>
	</body>


</html>
